import request from '@/config/axios'

export interface OnlineMessageVO {
                    id: number
                    openId: string
                    name: string
                    phone: string
                    conent: string
                    acceptTime: Date
                    acceptUserId: number
                    acceptContent: string
                    auditingContent: string
                    auditingTime: Date
}

// 查询在线留言列表
export const getOnlineMessagePage = async (params) => {
  return await request.get({ url: '/pro/online-message/page', params })
}

// 查询在线留言详情
export const getOnlineMessage = async (id: number) => {
  return await request.get({ url: '/pro/online-message/get?id=' + id })
}

// 新增在线留言
export const createOnlineMessage = async (data: OnlineMessageVO) => {
  return await request.post({ url: '/pro/online-message/create', data })
}

// 修改在线留言
export const updateOnlineMessage = async (data: OnlineMessageVO) => {
  return await request.put({ url: '/pro/online-message/update', data })
}

// 删除在线留言
export const deleteOnlineMessage = async (id: number) => {
  return await request.delete({ url: '/pro/online-message/delete?id=' + id })
}

// 导出在线留言 Excel
export const exportOnlineMessageApi = async (params) => {
  return await request.download({ url: '/pro/online-message/export-excel', params })
}